Pass struct domain* to domain_opt_feature().
This patch is preparation patch for HVM domain save/restore opt_feature.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
optf.on = XEN_IA64_OPTF_ON;
optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_WB|_PAGE_AR_RW);
optf.key = 0;
- domain_opt_feature(&optf);
+ domain_opt_feature(v->domain, &optf);
optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG5;
optf.pgprot = (_PAGE_P|_PAGE_A|_PAGE_D|_PAGE_MA_UC|_PAGE_AR_RW);
- domain_opt_feature(&optf);
+ domain_opt_feature(v->domain, &optf);
}
}
}
* The vcpu must be paused to avoid racy access to opt_feature.
*/
int
-domain_opt_feature(struct xen_ia64_opt_feature* f)
+domain_opt_feature(struct domain *d, struct xen_ia64_opt_feature* f)
{
- struct domain *d = current->domain;
struct opt_feature* optf = &d->arch.opt_feature;
struct vcpu *v;
long rc = 0;
struct xen_ia64_opt_feature optf;
set_xen_guest_handle(arg, (void*)(vcpu_get_gr(v, 32)));
if (copy_from_guest(&optf, arg, 1) == 0)
- regs->r8 = domain_opt_feature(&optf);
+ regs->r8 = domain_opt_feature(v->domain, &optf);
else
regs->r8 = -EFAULT;
break;
(1UL << XEN_IA64_OPTF_IDENT_MAP_REG5_BIT)
/* Set an optimization feature in the struct arch_domain. */
-extern int domain_opt_feature(struct xen_ia64_opt_feature*);
+extern int domain_opt_feature(struct domain *, struct xen_ia64_opt_feature*);
struct arch_domain {
struct mm_struct mm;